/* **********************************************************************************
*
* Copyright (c) Microsoft Corporation. All rights reserved.
*
* **********************************************************************************/

using System;
using System.Collections.Generic;
using System.Text;
using System.Xml.Serialization;
using System.Xml.Schema;
using System.ComponentModel;

namespace OfficeOpenXMLInterop
{
    #region Simple Types

    /// <summary>
    /// Font Collection Index
    /// </summary>
    [Serializable]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace = Namespaces.DrawingMLMain)]
    public enum ST_FontCollectionIndex
    {
        major,  // Major font
        minor,  // Minor font
    }

    /// <summary>
    /// Theme Color Reference
    /// </summary>
    [Serializable]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace = Namespaces.DrawingMLMain)]
    public enum ST_ColorSchemeIndex
    {
        dk1,            // dark 1
        lt1,            // light 1
        dk2,            // dark 2
        lt2,            // light 2
        accent1,        // accent 1
        accent2,        // accent 2
        accent3,        // accent 3
        accent4,        // accent 4
        accent5,        // accent 5
        accent6,        // accent 6
        hlink,          // hyperlink
        folHlink,       // followed hyperlink
    }

    #endregion

    #region Complex Types

    [Serializable]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace = Namespaces.DrawingMLMain)]
    public class CT_BaseStyles
    {
        public CT_ColorScheme clrScheme;

        public CT_FontScheme fontScheme;

        public CT_StyleMatrix fmtScheme;
    }

    [Serializable]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace = Namespaces.DrawingMLMain)]
    public class CT_CustomColor
    {
        public CT_CustomColor()
        {
            this.name = "";
        }

        public CT_ScRgbColor scrgbClr;
        public CT_SRgbColor srgbClr;
        public CT_HslColor hslClr;
        public CT_SystemColor sysClr;
        public CT_SchemeColor schemeClr;
        public CT_PresetColor prstClr;

        [System.Xml.Serialization.XmlAttributeAttribute()]
        [System.ComponentModel.DefaultValueAttribute("")]
        public string name;
    }

    /// <summary>
    /// Fill style list
    /// </summary>
    [Serializable]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace = Namespaces.DrawingMLMain)]
    public class CT_FillStyleList
    {
        // The set of fill types currently supported.  There should be only 3 fills
        //  at any given time contained within Items
        [System.Xml.Serialization.XmlElementAttribute("noFill", typeof(CT_NoFillProperties))]
        [System.Xml.Serialization.XmlElementAttribute("solidFill", typeof(CT_SolidColorFillProperties))]
        [System.Xml.Serialization.XmlElementAttribute("gradFill", typeof(CT_GradientFillProperties))]
        [System.Xml.Serialization.XmlElementAttribute("blipFill", typeof(CT_BlipFillProperties))]
        [System.Xml.Serialization.XmlElementAttribute("pattFill", typeof(CT_PatternFillProperties))]
        [System.Xml.Serialization.XmlElementAttribute("grpFill", typeof(CT_GroupFillProperties))]
        public object[] Items;
    }

    /// <summary>
    /// Effect style item
    /// </summary>
    [Serializable]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace = Namespaces.DrawingMLMain)]
    public class CT_EffectStyleItem
    {
        // TODO: effectLst and effectDag should be grouped together as a choice, one should not have
        //  both at the same time
        public CT_EffectList effectLst;         // Effect container
        public CT_EffectContainer effectDag;    // Effect container

        public CT_Scene3D scene3d;              // 3D scene properties
        public CT_Shape3D sp3d;                 // 3D properties
    }

    /// <summary>
    /// Style matrix
    /// </summary>
    [Serializable]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace = Namespaces.DrawingMLMain)]
    public class CT_StyleMatrix
    {
        public CT_StyleMatrix()
        {
            this.name = "";
        }

        public CT_FillStyleList fillStyleLst;           // fill style list

        [System.Xml.Serialization.XmlArrayItemAttribute("ln", IsNullable = false)]
        public CT_LineProperties[] lnStyleLst;          // line style list

        [System.Xml.Serialization.XmlArrayItemAttribute("effectStyle", IsNullable = false)]
        public CT_EffectStyleItem[] effectStyleLst;     // effect style list

        public CT_FillStyleList bgFillStyleLst;         // background fill style list

        [System.Xml.Serialization.XmlAttributeAttribute()]
        [System.ComponentModel.DefaultValueAttribute("")]
        public string name;                             // name of the style matrix
    }

    /// <summary>
    /// Color scheme
    /// </summary>
    [Serializable]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace = Namespaces.DrawingMLMain)]
    public class CT_ColorScheme
    {
        public CT_Color dk1;                            // color, dark 1
        public CT_Color lt1;                            // color, light 1
        public CT_Color dk2;                            // color, dark 2
        public CT_Color lt2;                            // color, light 2
        public CT_Color accent1;                        // color, accent 1
        public CT_Color accent2;                        // color, accent 2
        public CT_Color accent3;                        // color, accent 3
        public CT_Color accent4;                        // color, accent 4
        public CT_Color accent5;                        // color, accent 5
        public CT_Color accent6;                        // color, accent 6
        public CT_Color hlink;                          // color, hyperlink
        public CT_Color folHlink;                       // color, followed hyperlink

        [System.Xml.Serialization.XmlAttributeAttribute()]
        public string name;                             // name of the color scheme
    }

    /// <summary>
    /// Font scheme
    /// </summary>
    [Serializable]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace = Namespaces.DrawingMLMain)]
    public class CT_FontScheme
    {
        public CT_FontCollection majorFont;             // major font

        public CT_FontCollection minorFont;             // minor font

        [System.Xml.Serialization.XmlAttributeAttribute()]
        public string name;                             // name of the font scheme
    }

    /// <summary>
    /// Font collection
    /// </summary>
    [Serializable]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace = Namespaces.DrawingMLMain)]
    public class CT_FontCollection
    {
        public CT_TextFont latin;                       // Latin font

        public CT_TextFont ea;                          // East Asian font

        public CT_TextFont cs;                          // Complex script font

        [System.Xml.Serialization.XmlElementAttribute("font")]
        public CT_SupplementalFont[] font;              // List of suplemental fonts
    }

    /// <summary>
    /// Supplemental font
    /// </summary>
    [Serializable]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace = Namespaces.DrawingMLMain)]
    public class CT_SupplementalFont
    {
        [System.Xml.Serialization.XmlAttributeAttribute()]
        public string script;                           // font script

        [System.Xml.Serialization.XmlAttributeAttribute()]
        public string typeface;                         // font typeface
    }

    #endregion
}
